﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Leiktuther.Models;

namespace Leiktuther.Tests.MockObjects
{
    class MockDB : IAppRepository
    {
        public List<Game> _Games = new List<Game>
        {
            new Game { ID = 1, Name = "Leikurinn Jörð", maxPlayers = 4, GameRefer = "EarthWind" },
            new Game { ID = 3, Name = "Borðaðu Ostinn þinn", maxPlayers = 2, GameRefer = "EatCheese" },
            new Game { ID = 4, Name = "Sestu hérna stelpa", maxPlayers = 2, GameRefer = "SitGirl "},
            new Game { ID = 5, Name = "Snyrtu limgerðið", maxPlayers = 1, GameRefer = "ShaveBehave" }
        };
        
        public IEnumerable<Game> Games
        {
            get { return _Games; }
            set { }
        }

        public List<GameInstance> _GameInstances = new List<GameInstance>
        {
            new GameInstance { ID = 56, CreatorID = 1, Name = "Osturinn", isActivated = false, hasBegun = true, finished = true},
            new GameInstance { ID = 59, CreatorID = 1, Name = "Bylgjupappi", isActivated = true, hasBegun = false, finished = false},
            new GameInstance { ID = 65, CreatorID = 2, Name = "Tennisspaði", isActivated = false, hasBegun = true, finished = true},
            new GameInstance { ID = 67, CreatorID = 3, Name = "Örbylgja", isActivated = true, hasBegun = true, finished = false},
            new GameInstance { ID = 68, CreatorID = 2, Name = "Loftnet", isActivated = false, hasBegun = false, finished = true},
            new GameInstance { ID = 90, CreatorID = 2, Name = "Ristavél", isActivated = true, hasBegun = false, finished = false}
        };

        public IEnumerable<GameInstance> Instances
        {
            get { return _GameInstances; }
            set { }
        }
        
        public List<Statistic> _Statistics = new List<Statistic>
        {
            new Statistic { ID = 1, PlayerID = 2, GameID = 1, TotalGames = 18, Win = 10, Draw = 4, Loss = 4 },
            new Statistic { ID = 1, PlayerID = 1, GameID = 1, TotalGames = 9, Win = 5, Draw = 2, Loss = 2 },
            new Statistic { ID = 2, PlayerID = 2, GameID = 2, TotalGames = 20, Win = 10, Draw = 4, Loss = 6 },
            new Statistic { ID = 2, PlayerID = 3, GameID = 1, TotalGames = 5, Win = 1, Draw = 0, Loss = 4 },
            new Statistic { ID = 3, PlayerID = 2, GameID = 3, TotalGames = 2, Win = 0, Draw = 0, Loss = 2 }
        };

        public IEnumerable<Statistic> Statistics
        {
            get { return _Statistics; }
            set { }
        }
        
        public List<Player> _Players = new List<Player>
        {
                new Player { ID = 1, UserName = "gummifr", Email = "elskathetta@svefn.is" },
                new Player { ID = 2, UserName = "heitust", Email = "asdabomba@ruv.is" },
                new Player { ID = 3, UserName = "flottur", Email = "stop-spamming@gmail.com" }
        };

        public IEnumerable<Player> Players
        {
            get { return _Players; }
            set { }
        } 
    }
}
